package imgshare.mapper;

import imgshare.model.Image;
import imgshare.model.vo.ImageCondition;
import imgshare.model.vo.ImageWithSimpleUserInfo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ImageMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Image record);

    int insertSelective(Image record);

    Image selectByPrimaryKey(Integer id);

    List<Image> selectByCondition(ImageCondition imageCondition);

    int updateByPrimaryKeySelective(Image record);

    int updateByPrimaryKey(Image record);

    List<Image> selectAll();

    int nextId();

    List<Image> selectMyFollowingUsersPostedImagesBySubjectId(Integer userId);

    List<ImageWithSimpleUserInfo> selectImageWithUserInfoByCondition(ImageCondition condition);
}